<?php
namespace Home\Controller;
use Think\Controller;
class H5payController extends BaseController {
	public function __construct(){
		parent::__construct();
	}
	
    public function index(){
        $this->display();
    }

    public function pay(){
        //重新支付不需要刷新订单号
        if(isset($_GET['oid'])){
            $oid=$_GET['oid'];
        }else{
            $oid=time();
        }
        
    	$arr=$this->unifiedOrder(1,$oid,'h5');
        //print_r($arr);
    	header("location:".$arr['mweb_url'].'&redirect_url='. urlencode(self::REDURL.'?oid='.$oid));
    }

}